﻿using CrawlerApp.Infrastructure.Enums;
using Newtonsoft.Json;
using System;

namespace CrawlerApp.Infrastructure.Events
{
    public abstract class IntegrationEvent
    {
        [JsonProperty]
        public Guid Id { get; private set; }
        [JsonProperty]
        public DateTime CreateDateTime { get; private set; }
        public IntegrationEvent()
        {
            Id = new Guid();
            CreateDateTime = DateTime.UtcNow;
        }
        [JsonConstructor]
        public IntegrationEvent(Guid id, DateTime createDateTime)
        {
            Id = id;
            CreateDateTime = createDateTime;
        }
    }
}
